/*	Copyright 2007 - Xavier Baro (xbaro@cvc.uab.cat)

	This file is part of eapmlib.

    Eapmlib is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 3 of the License, or any 
	later version.

    Eapmlib is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.
*/
#include "EvolutiveLib.h"
#include <stdio.h>
#include <iostream>
#include "DissociatedDipole.h"

	using namespace Evolutive;

	//! Defines the possible test results
	enum TEST_RESULT {TEST_NONE,TEST_OK,TEST_FAIL,TEST_LIB_EXCEPTION,TEST_UNC_EXCEPTION};

	//! Defines the test class
	class CTest
	{

	public:

		//! Default constructor
		CTest();

		//! Default destructor
		virtual ~CTest();

		//! Return the number of available tests
		int GetNumTests(void);

		//! Executes the test
		void RunTest(int Idx);
		
	private:

		//! Shows the result of a test with the corresponding color
		void ShowResult(TEST_RESULT Result);

		//! Shows a title of the testing groups
		void ShowGroupTestsTitle(string Title);

		//! Shows the description of a test
		void ShowTestTitle(string Title);

		// Test functions:
		
		//! Function to test the dissociated dipoles
		bool TestDipoles(void);

		//! Function to test the object detector
		bool TestObjDetector(void);
		
		//! Function to test the cascade object
		bool TestCascade(void);

	private:
		
		//! Number of tests in the test class
		int m_NumTests;
	};
